<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center reportComments_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub reportComments_fd0_0'>
					<view class='flex flex-wrap align-center reportComments_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  reportComments_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='reportComments_fd0_0_c1_c0'>举报</text>
					</view>
					<view class='flex flex-wrap align-center justify-end reportComments_fd0_0_c0'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
				<view class='flex flex-wrap align-center reportComments_fd1_0'>
					<text class='reportComments_fd1_0_c0'>请选择举报原因</text>
				</view>
				<view class='flex flex-direction flex-wrap align-stretch reportComments_fd1_1'>
					<benben-select-diy ref="showSelectPopup1691400903991"
						class-name='flex flex-direction align-stretch flex'
						:items.sync="reportType" v-model="id" :label.sync="report_lable" default-type="value" default-label="title"
						:allow-cancel='false' type="radio" :disabled='false'>
						<template v-for='(item,key0) in reportType'>
							<view v-if="item.isSelected"
								class='flex align-center justify-between flex reportComments_fd1_1_c0_c0' :key="key0"
								@tap="$refs.showSelectPopup1691400903991.tapHandle(key0)">
								<text class='reportComments_fd1_1_c0_c0_c0'>{{item.title}}</text>
								<image class='reportComments_fd1_1_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"8.png"'>
								</image>
							</view>
							<view v-else class='flex align-center justify-between flex reportComments_fd1_1_c0_c0'
								:key="key0" @tap="$refs.showSelectPopup1691400903991.tapHandle(key0)">
								<text class='reportComments_fd1_1_c0_c0_c0'>{{item.title}}</text>
								<image class='reportComments_fd1_1_c0_c0_c1' mode="aspectFit"
									:src='STATIC_URL+"181.png"'></image>
							</view>
						</template>
					</benben-select-diy>
				</view>
				<view class='flex flex-direction flex-wrap align-stretch reportComments_fd1_2' v-if=" type=='1'">
					<text class='reportComments_fd1_0_c0'>请填写举报理由</text>
					<view class='flex flex-wrap align-center justify-center reportComments_fd1_2_c1'>
						<view class='flex flex-wrap reportComments_fd1_2_c1_c0'>
							<textarea class='flex reportComments_input_fd1_2_c1_c0' :placeholder="'最多输入300字（选填）'"
								:maxlength="300" :show-num='true'
								placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx"
								v-model="reportingdetails" />
							<template>
								<view class='flex flex justify-end reportComments_numberfd1_2_c1_c0_c0'>
									<text>{{reportingdetails.length}}</text>
									<text>/</text>
									<text>300</text>
								</view>
							</template>
						</view>
					</view>
				</view>
			</view>
			<!---flex布局flex布局结束-->
			<view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex reportComments_flex_2">
				<view class='flex flex-wrap align-start justify-center flex-sub'>
					<button class='reportComments_fd2_0_c0' @tap.stop="submitReportFunc()">提交</button>
				</view>
			</view>
			<view :style="{height: '138rpx'}"></view>
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"reportType": [{
					"title": "政治反动内容",
					"value": "1",
					"image": ""
				}, {
					"title": "低俗色情内容",
					"value": "2",
					"image": ""
				}, {
					"title": "垃圾广告信息",
					"value": "3",
					"image": ""
				}, {
					"title": "恶意攻击谩骂",
					"value": "4",
					"image": ""
				}, {
					"title": "举报其他违规",
					"value": "5",
					"image": ""
				}],
				"report_value": "",
				"report_lable": "",
				"reportingdetails": "",
				"report": [],
				"id": "",
				"type": "1"
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
		},
		watch: {},
		onLoad(options) {
			let {
				id,
				type
			} = options
			if (id !== undefined) this.id = id
			if (type !== undefined) this.type = type
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//提交举报
			submitReportFunc() {
				if (!validate(this.id, 'require')) {
					this.$message.info('请选择举报内容');
					return false;
				}
				this.$urouter.switchTab(`/pages/tabBar/home/home`);
			},
			//获取举报类型
			async getreportTypeFunc() {
				//请求方法
				//数据验证

				let datareportType = await this.$api.get(global.apiUrls.post64d2331cd7c47, {

				});

				if (datareportType.data.code != 1) {
					this.$message.info(datareportType.data.msg);
					return
				}
				let inforeportType = datareportType.data;
				this.reportType = inforeportType.data
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: var(--benbenbgColor1);
		background-size: 100% auto;
	}

	.reportComments_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.reportComments_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 88rpx;
	}

	.reportComments_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.reportComments_fd0_0_c0 {
		width: 120rpx;
	}

	.reportComments_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.reportComments_numberfd1_2_c1_c0_c0 {
		width: 100%;
		font-size: 24rpx;
		color: var(--benbenFontColor2);
		line-height: 46rpx;
		font-weight: 400;
	}

	.reportComments_input_fd1_2_c1_c0 {
		width: 100%;
		height: 195rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		white-space: pre-wrap;
	}

	.reportComments_fd1_2_c1_c0 {
		background: rgba(245, 245, 245, 1);
		width: 669rpx;
		padding: 24rpx 24rpx 24rpx 24rpx;
		border-radius: 16rpx;
	}

	.reportComments_fd1_2_c1 {
		margin: 24rpx 0rpx 0rpx 0rpx;
	}

	.reportComments_fd1_2 {
		padding: 30rpx 32rpx 0rpx 32rpx;
	}

	.reportComments_fd1_1_c0_c0_c1 {
		width: 36rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.reportComments_fd1_1_c0_c0_c0 {
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
	}

	.reportComments_fd1_1_c0_c0 {
		padding: 16rpx 0rpx 16rpx 0rpx;
	}

	.reportComments_fd1_1 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.reportComments_fd1_0_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 500;
	}

	.reportComments_fd1_0 {
		padding: 19rpx 32rpx 19rpx 32rpx;
	}

	.reportComments_flex_2 {
		width: 750rpx;
		height: 138rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
	}

	.reportComments_fd2_0_c0 {
		background: #FC5F80;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		width: 638rpx;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #fff;
		margin: 10rpx 0rpx 0rpx 0rpx;
		height: 88rpx;
	}
</style>